<?xml version="1.0" encoding="utf-8"?>
<!--
  <copyright file="bal.xsd" company="Outercurve Foundation">
    Copyright (c) 2004, Outercurve Foundation.
    This software is released under Microsoft Reciprocal License (MS-RL).
    The license and further copyright text can be found in the file
    LICENSE.TXT at the root directory of the distribution.
  </copyright>
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension"
         xmlns:html="http://www.w3.org/1999/xhtml"
    targetNamespace="http://schemas.microsoft.com/wix/BalExtension"
              xmlns="http://schemas.microsoft.com/wix/BalExtension">
    <xs:annotation>
        <xs:documentation>
            The source code schema for the Windows Installer XML Toolset Burn User Experience Extension.
        </xs:documentation>
    </xs:annotation>

    <xs:import namespace="http://schemas.microsoft.com/wix/2006/wi" />

    <xs:element name="Condition">
        <xs:annotation>
            <xs:documentation>
                Conditions for a bundle. The condition is specified in the inner text of the element.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Bundle" />
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Fragment" />
            </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:annotation>
                        <xs:documentation>
                            The condition that must evaluate to true for the installation to continue.
                        </xs:documentation>
                    </xs:annotation>
                    <xs:attribute name="Message" type="xs:string" use="required">
                        <xs:annotation>
                            <xs:documentation>
                                Set the value to the text to display when the condition fails and the installation must be terminated.
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="WixExtendedBootstrapperApplication">
        <xs:annotation>
            <xs:documentation>
                Configures WixExtendedBootstrapperApplication for a Bundle.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="BootstrapperApplicationRef" />
            </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="LaunchTarget" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        If set, the success page will show a Launch button the user can use to launch the application being installed.
                        The string value can be formatted using Burn variables enclosed in brackets, 
                        to refer to installation directories and so forth.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LaunchTargetElevatedId" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        Id of the target ApprovedExeForElevation element.
                        If set with LaunchTarget, WixStdBA will launch the application through the Engine's LaunchApprovedExe method instead of through ShellExecute.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LaunchArguments" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        If set, WixStdBA will supply these arguments when launching the application specified by the LaunchTarget attribute.
                        The string value can be formatted using Burn variables enclosed in brackets,
                        to refer to installation directories and so forth.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LaunchHidden" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>
                        If set to "yes", WixStdBA will launch the application specified by the LaunchTarget attribute with the SW_HIDE flag.
                        This attribute is ignored when the LaunchTargetElevatedId attribute is specified.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LaunchWorkingFolder" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        WixStdBA will use this working folder when launching the specified application.
                        The string value can be formatted using Burn variables enclosed in brackets,
                        to refer to installation directories and so forth.
                        This attribute is ignored when the LaunchTargetElevatedId attribute is specified.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LicenseFile" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Source file of the RTF license file. Cannot be used simultaneously with LicenseUrl.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LicenseUrl" type="xs:string">
                <xs:annotation>
                    <xs:documentation>URL target of the license link. Cannot be used simultaneously with LicenseFile. This attribute can be empty to hide the license link completely.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LogoFile" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Source file of the logo graphic.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LogoSideFile" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Source file of the side logo graphic.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="ThemeFile" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Source file of the theme XML.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="LocalizationFile" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Source file of the theme localization .wxl file.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="SuppressOptionsUI" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>If set to "yes", the Options button will not be shown and the user will not be able to choose an installation directory.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="SuppressDowngradeFailure" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>If set to "yes", attempting to installer a downgraded version of a bundle will be treated as a successful do-nothing operation.
                    The default behavior (or when explicitly set to "no") is to treat downgrade attempts as failures. </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="SuppressRepair" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>If set to "yes", the Repair button will not be shown in the maintenance-mode UI.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="ShowVersion" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>If set to "yes", the application version will be displayed on the UI.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
          <xs:attribute name="SupportCacheOnly" type="YesNoType">
              <xs:annotation>
                    <xs:documentation>If set to "yes", the bundle can be pre-cached using the /cache command line argument.</xs:documentation>
              </xs:annotation>
          </xs:attribute>
            <xs:attribute name="ShowFilesInUse" type="YesNoType">
              <xs:annotation>
                <xs:documentation>If set to "yes", WixStdBA will show a page allowing the user to restart applications when files are in use.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:attribute name="PrereqSupportPackage" type="YesNoType">
        <xs:annotation>
            <xs:documentation>
                When set to "yes", the Prereq BA will plan the package to be installed if its InstallCondition is "true" or empty.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="ExePackage" />
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="MsiPackage" />
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="MspPackage" />
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="MsuPackage" />
            </xs:appinfo>
        </xs:annotation>
    </xs:attribute>

    <xs:attribute name="Overridable" type="YesNoType">
        <xs:annotation>
            <xs:documentation>
                When set to "yes", lets the user override the variable's default value by specifying another value on the command line,
                in the form Variable=Value. Otherwise, WixStdBA won't overwrite the default value and will log 
                "Ignoring attempt to set non-overridable variable: 'BAR'."
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Variable" />
            </xs:appinfo>
        </xs:annotation>
    </xs:attribute>

  <xs:simpleType name="YesNoType">
        <xs:annotation>
            <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="no"/>
            <xs:enumeration value="yes"/>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>
